/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package miniprojet.Models;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;

/**
 *
 * @author cynthia
 */
public class Reproducteur {
    private int volume;
    private ArrayList<Piste> pistes;
    
    public void play()
    {
        throw new UnsupportedOperationException("Not yet implemented");
    }
    public void pause()
    {
        throw new UnsupportedOperationException("Not yet implemented");
    }
    public void reset()
    {
        throw new UnsupportedOperationException("Not yet implemented");
    }
    
    public void addPiste(String fileName) throws FileNotFoundException, UnsupportedEncodingException
    {
        String extension = fileName.substring(fileName.length()-5, fileName.length()-1);
        
        Encodeur encodeur = null;
        
        if(extension.toUpperCase().equals(".WAV"))
        {
            encodeur = new EncodeurWav();
        }
        else
        {
            throw new UnsupportedEncodingException();
        }
        this.pistes.add(encodeur.decoder(fileName));
    }
}
